package com.huosu.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * @program: miner-shield-web-v2
 * @description:
 * @author: changlin
 * @create: 2019-12-12 13:23
 **/

@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_version")
@ApiModel(value = "version对象", description = "系统版本表")
public class Version extends Model<Version> implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "本地版本号")
    @TableField("version")
    private String localVersion;

    @ApiModelProperty(value = "类型")
    private String type;

    @ApiModelProperty(value = "名称")
    private String name;

    @ApiModelProperty(value = "内容")
    private String note;

    @ApiModelProperty(value = "时间")
    private String creatime;

    @ApiModelProperty(value = "发布版本号")
    @TableField(exist = false)
    @JSONField(name = "version")
    private String publishVersion;

    @ApiModelProperty(value = "是否有更新")
    @TableField(exist = false)
    private boolean newest;

    @ApiModelProperty(value = "下载链接", hidden = true)
    private String url;

    @ApiModelProperty(value = "文件名", hidden = true)
    private String fileName;

    @ApiModelProperty(value = "MD5", hidden = true)
    private String md5;

    @ApiModelProperty(value = "内容英文", hidden = true)
    @TableField(exist = false)
    private String typeEName;

    @ApiModelProperty(value = "是否下载成功", hidden = true)
    @TableField(exist = false)
    private boolean downSuccess;

    @ApiModelProperty(value = "是否重启成功", hidden = true)
    @TableField(exist = false)
    private boolean restartSuccess;

}
